package org.jeecg.modules.basic.customer.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 客商信息表
 * @Author: jeecg-boot
 * @Date: 2023-07-26
 * @Version: V1.0
 */
@Data
@TableName("wms_basic_customer")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "wms_basic_customer对象", description = "客商信息表")
public class BasicCustomer implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**
     * 使用组织
     */
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
    @Excel(name = "使用组织", width = 15)
    @ApiModelProperty(value = "使用组织")
    private String sysOrgCode;
    /**
     * 客户编码
     */
    @Excel(name = "客户编码", width = 15)
    @ApiModelProperty(value = "客户编码")
    private String code;
    /**
     * 客户名称
     */
    @ApiModelProperty(value = "客户名称")
    private String name;
    /**
     * 客户类型
     */
    @Excel(name = "客户类型", width = 15, dicCode = "custom_type")
    @Dict(dicCode = "custom_type")
    @ApiModelProperty(value = "客户类型")
    private String type;
    /**
     * 联系人
     */
    @Excel(name = "联系人", width = 15)
    @ApiModelProperty(value = "联系人")
    private String contacts;
    /**
     * 联系电话
     */
    @Excel(name = "联系电话", width = 15)
    @ApiModelProperty(value = "联系电话")
    private String phone;
    /**
     * 状态
     */
    @Excel(name = "状态", width = 15, dicCode = "is_open")
    @Dict(dicCode = "is_open")
    @ApiModelProperty(value = "状态")
    private String status;
    /**
     * 描述
     */
    @Excel(name = "描述", width = 25)
    @ApiModelProperty(value = "描述")
    private String description;
    /**
     * 删除状态（0，正常，1已删除）
     */
    private Integer delFlag;
    /**
     * 租户id
     */
    private Integer tenantId;
    /**
     * 类别,1 客户, 2 供应商
     */
    @Dict(dicCode = "basic_customer_supplier")
    @ApiModelProperty(value = "类别,1 客户, 2 供应商")
    private String kind;

    @Excel(name = "是否使用", dicCode = "yn")
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "0 未使用 1是使用")
    private Integer used;
}
